// ActionScript file
import com.champChooser.constants.CCConstants;

import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;

private static const TOP_5_USER_TEAMS:String = "Top 5 Users' Teams";
private static const TOP_5_BATSMEN:String = "Top 5 Batsmen";
private static const TOP_5_BOWLERS:String = "Top 5 Bowlers";
private static const TOP_5_ALL_ROUNDERS:String = "Top 5 All Rounders";
private static const TOP_5_WICKET_KEEPERS:String = "Top 5 Wicket Keepers";
private static const TOP_5_LEADERBOARD:String = "Leaderboard";

private const top5BatsmenServiceUrl:String = "http://"+CCConstants.SERVER_IP+"/ChampChooser/core/services/user/topNBatsmenService.php";

/* private var _cubeForm:CubeForm; */

[Bindable]
private var top5Batsmen:ArrayCollection;

protected function top5BatsmenServiceHandler(event:ResultEvent):void{
	top5Batsmen = event.result.records.record as ArrayCollection;
	
  	if(top5Batsmen==null){
  		top5Batsmen = new ArrayCollection();
  	}
}

private function faultHandler(event:FaultEvent):void{
	Alert.show("OOPS");
}
// Define public getter.
/* public function get cubeForm():CubeForm{
    return _cubeForm;
}
 */
// Define public setter. 
/* public function set cubeForm(value:CubeForm):void {
    _cubeForm = value;
}

public function initLeaderboardCube():void
{
	cubeForm = new CubeForm(paperCanvas.canvas);
	cubeForm.viewStack = views;
} */